package com.simple.structure.facade;

import com.simple.LogUtil;

/**
 * @author simple
 * @version 1.0
 * @date 2018-12-17 09:23
 * @since 1.0
 */
public class Computer {
    private Cpu cpu;
    private Memory memory;
    private Disk disk;

    public Computer() {
        this.cpu = new Cpu();
        this.memory = new Memory();
        this.disk = new Disk();
    }

    public void startup() {
        LogUtil.info("Computer Start Up");
        cpu.startup();
        memory.startup();
        disk.startup();
        LogUtil.info("Computer Started");
    }

    public void shutdown() {
        LogUtil.info("Computer Shutdown");
        cpu.shutdown();
        memory.shutdown();
        disk.shutdown();
        LogUtil.info("Computer Closed");
    }
}
